home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-03-19 | 1.4 KB | 34 lines | [TEXT/MPS ] |
- #########################################################################
- # BuildListFromResourceMacDraw( idNum )
- #========================================================================
- # Author: KTA
- # Description: Returns a list generated from all of the strings in a specified
- # string list resource specified by <idNum>.
- # Parameters: idNum := resource id number for the string list resource.
- # Returns: list - all strings in specified string list resource.
- # Examples: BuildListFromResource( 201 );
- # Assumptions: This task must be contained within the same file that contains
- # the resources. Currently this task only supports up to 100 strings
- # in a single str# resource.
- # Note: The naming convension is to append the name
- # of the application under test to the end of the task name.
- # For example, BuildListFromResourceMacDraw()
- #========================================================================
- # History:
- #
- #########################################################################
- task BuildListFromResourceMacDraw(idNum)
- begin
- numtimes := 100; #Assumes no resource will contain more than 100 strings
- theList := {};
- for i := 1 to numtimes
- begin
- CurrentFont := GetIndString(idNum,i);
- if (isUndefined(CurrentFont))
- numtimes := i;
- else
- theList := Insert(CurrentFont,Card(theList)+1, theList);
- end;
- return(theList);
- end; # BuildListFromResourceMacDraw
-